package com.qing.study.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

//Spring组合注解，相当于@Controller和@ResponseBody，声明该controller交给spring管理
@RestController
@Api(tags = "Hello")
public class HelloController {

    @ApiOperation("Hello")
    @GetMapping("hello/{name}")
    public String hello(@PathVariable String name) {
        return "Hello Spring Boot!!!" + name;
    }
}
